#include <stdio.h>
int main(){
    char str[30],i=0;
    int digit=0,space=0,other=0,upper_case=0,lower_case=0;
    printf("input string:  ");
    gets(str);
    for(int j=0;str[j]!='\0';j++){
        if(str[j]>= 'A'&&str[j]<='Z'){
            upper_case++; 
        }else if(str[j]>= 'a'&&str[j]<='z'){
            lower_case++;
        }else if(str[j]==' '){
            space++;
        }else if(str[j]>= '0'&&str[j]<='9'){
            digit++;
        }else{
            other++;
        }
    }
    printf("upper case:%d     lower case:%d     space:%d     digit:%d     other:%d     ",upper_case,lower_case,space,digit,other);
}